package rad.framework.mda.generator.template.test.resources;

public class Log4j
{
  protected static String nl;
  public static synchronized Log4j create(String lineSeparator)
  {
    nl = lineSeparator;
    Log4j result = new Log4j();
    nl = null;
    return result;
  }

  public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
  protected final String TEXT_1 = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" + NL + "<!DOCTYPE log4j:configuration SYSTEM \"log4j.dtd\">" + NL + "" + NL + "<log4j:configuration xmlns:log4j=\"http://jakarta.apache.org/log4j/\">" + NL + "" + NL + "\t<appender name=\"CONSOLE\" class=\"org.apache.log4j.ConsoleAppender\"> " + NL + "\t\t<param name=\"Target\" value=\"System.out\"/> " + NL + "\t\t<param name=\"Threshold\" value=\"WARN\"/>" + NL + "\t\t<layout class=\"org.apache.log4j.PatternLayout\"> " + NL + "\t\t\t<param name=\"ConversionPattern\" value=\"%d %-5p [%c] %m%n\"/>" + NL + "\t\t</layout> " + NL + "\t</appender> " + NL + "" + NL + "\t<appender name=\"FILE\" class=\"org.apache.log4j.FileAppender\">" + NL + "\t\t<param name=\"Append\" value=\"true\"/>" + NL + "\t\t<param name=\"File\" value=\"./target/test.log\"/>" + NL + "\t\t<param name=\"Threshold\" value=\"ALL\"/>" + NL + "\t\t<layout class=\"org.apache.log4j.PatternLayout\"> " + NL + "\t\t\t<param name=\"ConversionPattern\" value=\"%d %-5p [%c] %m%n\"/>" + NL + "\t\t</layout> " + NL + "\t</appender>\t" + NL + "\t" + NL + "\t<!-- ############### Embedded JBoss AS #################\t-->" + NL + "\t<category name=\"org.jboss\">" + NL + "\t\t<priority value=\"ERROR\"/>" + NL + "\t</category>" + NL + "\t<category name=\"com.arjuna\">" + NL + "\t\t<priority value=\"ERROR\"/>" + NL + "\t</category>" + NL + "\t" + NL + "\t<!-- EMB-6, JMS activation throws an error due to deployment ordering, but as there is a timeout" + NL + "\tand retry the tests pass. Hide the error message -->" + NL + "\t<category name=\"jboss.resource.adapter.jms.inflow.JmsActivation\">" + NL + "\t\t<priority value=\"ERROR\"/>" + NL + "\t</category>" + NL + "\t" + NL + "\t<category name=\"org.jboss.ejb.txtimer.EJBTimerServiceImpl\">" + NL + "\t\t<level value=\"FATAL\"/>" + NL + "\t</category>" + NL + "" + NL + "\t<!-- ############### Hibernate logging ################# -->" + NL + "\t<category name=\"org.hibernate\">" + NL + "\t\t<priority value=\"ERROR\"/>" + NL + "\t</category>" + NL + "" + NL + "\t<!--" + NL + "\t<category name=\"org.hibernate.SQL\">" + NL + "\t\t<priority value=\"TRACE\"/>" + NL + "\t</category>" + NL + "\t<category name=\"org.hibernate.type\">" + NL + "\t\t<priority value=\"TRACE\"/>" + NL + "\t</category>" + NL + "\t<category name=\"org.hibernate.loader\">" + NL + "\t\t<priority value=\"TRACE\"/>" + NL + "\t</category>" + NL + "\t<category name=\"org.hibernate.cache\">" + NL + "\t\t<priority value=\"TRACE\"/>" + NL + "\t</category>" + NL + "\t-->" + NL + "" + NL + "\t<!-- Ajax4jsf is too noisy -->" + NL + "\t<category name=\"org.ajax4jsf.cache\">" + NL + "\t\t<priority value=\"WARN\"/>" + NL + "\t</category>" + NL + "" + NL + "\t<!-- ############### Seam logging ################### -->" + NL + "\t<category name=\"org.jboss.seam\">" + NL + "\t\t<priority value=\"WARN\"/>" + NL + "\t</category>" + NL + "" + NL + "\t<category name=\"org.jboss.seam.transaction.SynchronizationRegistry\">" + NL + "\t\t<level value=\"FATAL\"/>" + NL + "\t</category>" + NL + "\t<category name=\"org.jboss.seam.security.permission.PermissionManager\">" + NL + "\t\t<level value=\"ERROR\"/>" + NL + "\t</category>" + NL + "\t<category name=\"org.jboss.seam.security.permission.PersistentPermissionResolver\">" + NL + "\t\t<level value=\"ERROR\"/>" + NL + "\t</category>" + NL + "" + NL + "\t<!-- These things are too noisy" + NL + "\t<category name=\"org.jboss.seam.jsf.SeamVariableResolver\">" + NL + "\t\t<priority value=\"INFO\"/>" + NL + "\t</category>" + NL + "\t<category name=\"org.jboss.seam.contexts.Contexts\">" + NL + "\t\t<priority value=\"INFO\"/>" + NL + "\t</category>" + NL + "\t<category name=\"org.jboss.seam.Component\">" + NL + "\t\t<priority value=\"INFO\"/>" + NL + "\t</category>" + NL + "\t<category name=\"org.jboss.seam.deployment.Scanner\">" + NL + "\t\t<priority value=\"INFO\"/>" + NL + "\t</category>" + NL + "\t<category name=\"org.jboss.seam.util.Naming\">" + NL + "\t\t<priority value=\"INFO\"/>" + NL + "\t</category>" + NL + "\t<category name=\"org.jboss.seam.debug.hot\">" + NL + "\t\t<priority value=\"INFO\"/>" + NL + "\t</category>" + NL + "\t<category name=\"org.jboss.seam.core.Events\">" + NL + "\t\t<priority value=\"INFO\"/>" + NL + "\t</category>" + NL + "\t-->" + NL + "" + NL + "\t<!-- Debugging conversations and persistence contexts" + NL + "\t<category name=\"org.jboss.seam.core.Manager\">" + NL + "\t\t<priority value=\"DEBUG\"/>" + NL + "\t</category>" + NL + "\t<category name=\"org.jboss.seam.core.ManagedPersistenceContext\">" + NL + "\t\t<priority value=\"DEBUG\"/>" + NL + "\t</category>" + NL + "\t<category name=\"org.jboss.seam.jsf.AbstractSeamPhaseListener\">" + NL + "\t\t<priority value=\"DEBUG\"/>" + NL + "\t</category>" + NL + "\t<category name=\"org.jboss.seam.interceptors.ConversationInterceptor\">" + NL + "\t\t<priority value=\"DEBUG\"/>" + NL + "\t</category>" + NL + "\t<category name=\"org.jboss.seam.contexts.Lifecycle\">" + NL + "\t\t<priority value=\"DEBUG\"/>" + NL + "\t</category>" + NL + "\t<category name=\"org.hibernate.impl.SessionImpl\">" + NL + "\t\t<priority value=\"DEBUG\"/>" + NL + "\t</category>" + NL + "\t<category name=\"org.hibernate.event.def.AbstractFlushingEventListener\">" + NL + "\t\t<priority value=\"DEBUG\"/>" + NL + "\t</category>" + NL + "\t-->" + NL + "" + NL + "\t<!-- ############### Apache logging ################### -->" + NL + "\t<category name=\"org.apache\">" + NL + "\t\t<priority value=\"WARN\"/>" + NL + "\t</category>" + NL + "" + NL + "\t<!-- ############### Rad-Framework logging ################### -->" + NL + "\t<category name=\"rad.framework\">" + NL + "\t\t<priority value=\"DEBUG\"/>" + NL + "\t</category>" + NL + "\t<category name=\"rad.framework.audit\">" + NL + "\t\t<priority value=\"WARN\"/>" + NL + "\t</category>" + NL + "\t<category name=\"rad.framework.jms\">" + NL + "\t\t<priority value=\"WARN\"/>" + NL + "\t</category>" + NL + "\t" + NL + "\t<root> " + NL + "\t\t<appender-ref ref=\"CONSOLE\" />" + NL + "\t\t<appender-ref ref=\"FILE\" /> " + NL + "\t</root>" + NL + "\t" + NL + "</log4j:configuration>";

  public String generate(Object argument)
  {
    final StringBuffer stringBuffer = new StringBuffer();
    

    stringBuffer.append(TEXT_1);
    return stringBuffer.toString();
  }
}
